package org.example.controller;

import org.example.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private EmailService emailService;

//    502914391@qq.com
    @RequestMapping ("/test-email")
    public String testEmail() {
        emailService.sendEmail("3447003818@qq.com", "测试邮件", "这是一封测试邮件");
        return "邮件已触发";
    }
}